Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MotionStreak initializing and avoid trail delay by one frame #10982

Merged
merged 3 commits into from Jul 19, 2022

Conversation

jareguo
Copy link
Contributor

@jareguo jareguo commented May 6, 2022

Re: #9693 cocos-creator-packages/jsb-adapter#368

Changelog:

  • MotionStreak effect optimization: Fix the trail to the origin when initializing and avoid trail delay by one frame.

@jareguo
Copy link
Contributor Author

jareguo commented May 6, 2022

1651819926515830.mp4

非常抱歉,是我的锅,之前做的时候有发现这个问题,拖得有点久后来提交时就忘修复了

@jareguo jareguo closed this May 23, 2022
@jareguo jareguo reopened this May 23, 2022
@holycanvas holycanvas changed the base branch from v2.4.9 to v2.4.10 June 7, 2022 10:43
@finscn
Copy link
Contributor

finscn commented Jul 18, 2022

不知道是不是 github 的bug, 用 is:pr is:open head:v2.4.10 搜索, 搜不到这个PR .
你们别忘了合并.

@@ -92,14 +92,15 @@ export default class MotionStreakAssembler extends Assembler2D {
let stroke = comp._stroke / 2;

let node = comp.node;
node._updateWorldMatrix();
let matrix = node._worldMatrix.m;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let matrix = node.getWorldMatrix(cache_matrix);

This will ensure the matrix is always updated, and it avoid using private method

@pandamicro pandamicro merged commit 8505995 into cocos:v2.4.10 Jul 19, 2022
@jareguo
Copy link
Contributor Author

jareguo commented Jul 20, 2022

不知道是不是 github 的bug, 用 is:pr is:open head:v2.4.10 搜索, 搜不到这个PR . 你们别忘了合并.

我都是用 `base:v2.4.` 进行模糊搜索

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants